import request from '@/utils/request'

// 获取全部档案
export function getRecordInfoList () {
  return request({
    url: '/wms/record/getRecordInfoList',
    method: 'get',
  })
}

// 修改状态
export function changeRecordStatus (id, recordStatus) {
  return request({
    url: '/wms/record/changeRecordStatus',
    method: 'put',
    params: {
      id, recordStatus
    }
  })
}
// 查询物料管理列表
export function listRecord (query) {
  return request({
    url: '/wms/record/list',
    method: 'get',
    params: query
  })
}

// 查询物料管理详细
export function getRecord (id) {
  return request({
    url: '/wms/record/' + id,
    method: 'get'
  })
}

// 新增物料管理
export function addRecord (data) {
  return request({
    url: '/wms/record',
    method: 'post',
    data: data
  })
}

// 修改物料管理
export function updateRecord (data) {
  return request({
    url: '/wms/record',
    method: 'put',
    data: data
  })
}

// 删除物料管理
export function delRecord (id) {
  return request({
    url: '/wms/record/' + id,
    method: 'delete'
  })
}
